package com.sourceQ.system.mapper.tenant;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sourceQ.system.domain.tenant.Tenant;
import com.sourceQ.system.dto.tenant.TenantPageReqDTO;
import com.sourceQ.system.vo.tenant.TenantVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: SourceQ
 * @create: 2024-03-26 10:14
 * @Description:
 */
public interface TenantMapper extends BaseMapper<Tenant> {

    @Select(value = "select * from sys_tenant t where t.del_flag='0'")
    List<Tenant> searchAllByDelFlagTenants();

    Long selectCountByPackageId(Long packageId);

    IPage<TenantVo> page(Page page, @Param("dto") TenantPageReqDTO dto);


}
